﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="PictureList.aspx.cs" Inherits="Client_Web.PictureList" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h1>
        Liste des images
    </h1>
    <%
        if (Session["userLogin"] != null)
        { 
    %>
    <a href="~/Gallery/PictureAdd.aspx" runat="server">Ajouter une image</a>
    <div class="clear">
    </div>
    <% 
        }
        if (0 < pictureList.Count)
        {
            foreach (Client_Web.PictureStruct picture in pictureList)
            { %>
    <div class="picture_item">
        <a href="PictureView.aspx?PictureId=<% Response.Write(picture.id); %>" title="<% Response.Write(picture.name); %>">
            <img src="Picture.aspx?PictureId=<% Response.Write(picture.id); %>" title="<% Response.Write(picture.name); %>"
                alt="<% Response.Write(picture.name); %>" />
        </a>
        <h2>
            <a href="PictureView.aspx?PictureId=<% Response.Write(picture.id); %>" title="<% Response.Write(picture.name); %>">
                #<% Response.Write(picture.id); %>&nbsp;-&nbsp;<% Response.Write(picture.name); %>
            </a>
        </h2>
    </div>
    <% } %>
    <div class="clear">
    </div>
    <% }
        else
        { %>
    <p>
        Aucune image à afficher.
    </p>
    <% } %>
</asp:Content>
